import React, { Component } from 'react';

export default class Child2 extends Component {
  render() {
    console.log(this.props);
    return (
      <div className="child2">
        <h3>我是Child2（弟）组件</h3>
        {/* 发送消息 */}
        <button onClick={() => this.props.sendMsg('我挨打了')}>
          说：我挨打了
        </button>
      </div>
    );
  }
}
